package com.sunlands.zlcx.usercenter.domain;



import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.ToString;
import org.codehaus.jackson.annotate.JsonIgnore;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * @author shixiaopeng
 */
@Entity(name = "tz_city")
@Data
@ToString
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class CityDO implements Serializable {

    private static final long serialVersionUID = 3093232760205457936L;

    @Id
    private Long id;

    private String name;

    private String showName;

    private String code;

    private Integer level;

    private String pcode;

    private String abbr;

    private Integer openStatus;

    private Date createDate;

    private Date lastModifyDate;

    private String createFid;

    private Boolean isDel;

    @OneToMany(fetch=FetchType.EAGER)
    @JsonIgnore
    @JoinColumn(name="pcode",referencedColumnName="code")
    private List<CityDO> cityList;

}